package com.imooc.news_manager_project.dto;

import com.imooc.news_manager_project.common.validator.SaveValidator;
import com.imooc.news_manager_project.common.validator.UpdateValidator;
import lombok.Data;

import javax.validation.constraints.NotBlank;

@Data
public class UserDTO {

    @NotBlank(message = "id不能为空",groups = {UpdateValidator.class})
    private Integer id;

    @NotBlank(message = "用户名不能为空",groups = {SaveValidator.class, UpdateValidator.class})
    private String name;

    @NotBlank(message = "密码不能为空",groups = {SaveValidator.class, UpdateValidator.class})
    private String password;

    @NotBlank(message = "手机号不能为空",groups = {SaveValidator.class, UpdateValidator.class})
    private String mobile;

    @NotBlank(message = "角色不能为空",groups = {SaveValidator.class, UpdateValidator.class})
    private String role;

    private String workUnit;


}
